home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing;
-
- import java.awt.Color;
- import java.io.PrintStream;
- import java.util.Hashtable;
-
- class DebugGraphicsInfo {
- Color flashColor;
- int flashTime;
- int flashCount;
- Hashtable componentToDebug;
- JFrame debugFrame;
- PrintStream stream;
-
- int getDebugOptions(JComponent component) {
- if (this.componentToDebug == null) {
- return 0;
- } else {
- Integer integer = (Integer)this.componentToDebug.get(component);
- return integer == null ? 0 : integer;
- }
- }
-
- void log(String string) {
- this.stream.println(string);
- }
-
- void setDebugOptions(JComponent component, int debug) {
- if (this.componentToDebug == null) {
- this.componentToDebug = new Hashtable();
- }
-
- this.componentToDebug.put(component, new Integer(debug));
- }
-
- DebugGraphicsInfo() {
- this.flashColor = Color.red;
- this.flashTime = 100;
- this.flashCount = 2;
- this.debugFrame = null;
- this.stream = System.out;
- }
- }
-